<?php 

$string = "
<h1>Karakteristika lokale</h1>
<p>1dfbdfb dfsbdfsb f bsdfb dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb</p>
<!-- pagebreak -->
<h1>Frymezimi shpirteror</h1>
<p>2dfbdfb dfsbdfsb f bsdfb dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb</p>
<!-- pagebreak -->
<h1>Ndjenjat foshnjore</h1>
<p>3dfbdfb dfsbdfsb f bsdfb dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb</p>
<!-- pagebreak -->
<h1>Psikologjia mentale e nje foshnje te posalindur</h1>
<p>4dfbdfb dfsbdfsb f bsdfb dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb</p>
<!-- pagebreak -->
<h1>Dualiteti shoqeror dhe fati i shoqeris</h1>
<p>5dfbdfb dfsbdfsb f bsdfb dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb</p>
<!-- pagebreak -->
<h1>Marveshjet nderkometare</h1>
<p>6dfbdfb dfsbdfsb f bsdfb dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb< dfbdfb dfsbdfsb f bsdfb</p>
";
$return = preg_split('|<h1>.*</h1>|im', $string) ;
print_r($return);
?>